<?php

Yii::import('application.models._base.BaseStudentDetails');

class StudentDetails extends BaseStudentDetails {

    public $confirm_email_address;

    public static function model($className = __CLASS__) {
        return parent::model($className);
    }

    public function rules() {
        return array(
            array('first_name, last_name, mobile_no, email_address,confirm_email_address,city, address_line1,nationality, state_id', 'required'),
            array('email_address,confirm_email_address', 'email'),
            array('mobile_no,alterne_no,landline_no', 'length', 'max' => 10),
            array('email_address', 'compare', 'compareAttribute' => 'confirm_email_address'),
            array('gender, mobile_no, alterne_no, landline_no, state_id', 'numerical', 'integerOnly' => true),
            array('first_name, middle_name, last_name, nationality, email_address, address_line1, address_line2, city', 'length', 'max' => 45),
            array('middle_name, gender, nationality, alterne_no, landline_no, address_line2, city', 'default', 'setOnEmpty' => true, 'value' => null),
            array('id, first_name, middle_name, last_name, gender, nationality, mobile_no, alterne_no, landline_no, email_address, address_line1, address_line2, city, state_id', 'safe', 'on' => 'search'),
        );
    }

}